/* * * * * * * * * * * * * * * * * * * *
 * Karlan Mitchell (C) 2004-2006       *
 * karlanmitchell@gmail.com            *
 * This source is LGPL                 *
 * * * * * * * * * * * * * * * * * * * */
 
/* * * * * * * * * * * * * * * * * * * *
 * env.h:  Functions which modify      *
 * the program's environment, such as  *
 * changing the current working        *
 * directory.                          *
 * This is where most of the           *
 * cross-platform base is found        * 
 * * * * * * * * * * * * * * * * * * * */


#ifndef __SIMPLE_ENV_H__
#define __SIMPLE_ENV_H__

#ifdef WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include "string.h"
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <limits.h>

#ifdef WIN32

       //#if !defined(ssize_t)
         //  #define ssize_t  int long
       //#endif // Visual C++ does not define ssize_t by default.
     //  #if !defined(size_t)
       //    #define size_t  int unsigned long
   //    #endif

#define strncasecmp strnicmp
#define strcasecmp   stricmp 
#define simple_mkdir mkdir 
#else
#include <sys/stat.h>
#include <sys/types.h>

int simple_mkdir(char * dirname);
#endif


#ifndef WIN32
int GetTempPath(size_t nBufferLength, char *lpBuffer);
#endif

int create_tmp_file(char * seed, char * filename, size_t filename_len);

#ifdef WIN32
int setcwd(char * Dir);
#endif


#endif
